<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.general.AES" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%
    //==============宿舍管理跳转链接===================
    String newUrl = request.getParameter("newUrl");
    String strRequestid = request.getParameter("requestid");
    if(newUrl!=null && newUrl.length()>0 && null!=strRequestid&&strRequestid.length()>0) {
        User user = (User) request.getSession(true).getAttribute("weaver_user@bean");
        //获取当前登录人的id
        String strUserid = Util.null2String(user.getUID());

        RecordSet rs=new RecordSet();
        rs.execute("select * from hrmresource where id="+strUserid);
        String gh="";
        String loginId=user.getLoginid();
        String username=user.getUsername();
        while (rs.next()){
            gh=Util.null2String(rs.getString("workcode"));
        }
        if (newUrl.contains("?")) {
            newUrl = newUrl + "&usercode=" + gh;
        }else{
            newUrl = newUrl+"?usercode="+gh;
        }
        newUrl = newUrl + "&user=" + loginId;
//        response.sendRedirect("http://10.2.0.57/dorm/home/index?usercode=" + strUserid);
        response.sendRedirect(newUrl);
    }
%>